# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Sefa Eyeoglu <contact@scrumplex.net>
# Contributor: Daniel Maslowski <info@orangecms.org>

pkgname=fisher
pkgver=4.4.3
pkgrel=1
pkgdesc='A package manager for the fish shell'
arch=('any')
url='https://github.com/jorgebucaran/fisher'
license=('MIT')
depends=('fish' 'curl')
makedepends=('git')
# TODO add fishtape for tests
_commit='36810b39401536650d7a1018c8f3832f51741950'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

package() {
  cd "$pkgname"

  # install to global fish directory
  install -vDm644 -t "$pkgdir/usr/share/fish/vendor_functions.d" functions/fisher.fish
  install -vDm644 -t "$pkgdir/usr/share/fish/vendor_completions.d" completions/fisher.fish

  # documentation
  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}
